package com.ruoyi.project.xkx.order.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author WuYalong
 * @since 2021-05-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class YsOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    /**
     * 订单编号
     */
    private String orderNumber;

    /**
     * 订单日期
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderDate;

    /**
     * 订单类型
     */
    private Integer orderCategoryId;

    /**
     * 订单价格 并非 最终支付的价格 因为考虑到 中间有一个优惠价格
     */
    private Double orderAmount;

    /**
     * 支付方式
     */
    private Integer wayId;

    /**
     * 支付金额 最终支付的金额
     */
    private double wayAmount;

    /**
     * 学生编号 该订单来自哪个学生
     */
    private Integer studentId;

    /**
     * 顾问编号 该订单由谁介绍
     */
    private Integer userId;

    /**
     * 课程编号 报的什么课程
     */
    private Integer courseId;

    @TableField(exist = false)
    private String wayName;

    @TableField(exist = false)
    private String categoryName;

    @TableField(exist = false)
    private String studentNumber;

    @TableField(exist = false)
    private String studentName;

    @TableField(exist = false)
    private String nickName;
}
